from docx import Document
from docx import *

from docx.table import Table
from docx.text.paragraph import Paragraph


def run(path):
    doc = Document(path)
    print('paragraphs')
    for paragraph in doc.paragraphs:
        print([*paragraph.text])

    print('tables')
    for t in doc.tables:
        print(t)

    print('sections')
    for t in doc.sections:
        print(t)

    print('styles')
    for t in doc.styles:
        print(t)

    # for tables in doc.tables:
    #     print(tables)


path = r'd:\电子商务专业必修课2 - 副本.docx'
run(path)
